package com.zcxy.sys.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zcxy.mybatis.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * 物料属性
 *
 * @author zcc
 * @email 860474958@qq.com
 * @date 2020-09-12
 */
@Data
@TableName("sys_autocode")
@ApiModel(value = "SysAutocode", description = "代码生成实体对象")
public class SysAutocode extends BaseEntity {


    @ApiModelProperty(value = "包路径", required = false)
    @Length(max = 255, message = "packagePath 超出最大长度：255")
    private String packagePath;


    @ApiModelProperty(value = "*表名", required = false)
    @Length(max = 50, message = "tableName 超出最大长度：50")
    private String tableName;


    @ApiModelProperty(value = "类名", required = false)
    @Length(max = 255, message = "className 超出最大长度：255")
    private String className;

    @ApiModelProperty(value = "类名小写", required = false)
    @Length(max = 255, message = "className 超出最大长度：255")
    private String classNameS;


    @ApiModelProperty(value = "功能描述", required = false)
    @Length(max = 255, message = "describe 超出最大长度：255")
    private String comment;


    @ApiModelProperty(value = "主表的描述", required = false)
    @Length(max = 255, message = "relationTableDescribe 超出最大长度：255")
    private String relationTableDescribe;


    @ApiModelProperty(value = "主表的主键", required = false)
    @Length(max = 255, message = "relationKey 超出最大长度：255")
    private String relationKey;


    @ApiModelProperty(value = "1.单表2.左树(主表)3.右表(附表)3.主表4.附表5.树表", required = false)
    @Length(max = 255, message = "relationType 超出最大长度：255")
    private String relationType;

    @ApiModelProperty(value = "属性列", required = false)
    @TableField(exist = false)
    private List<SysAutocodeItem> sysAutocodeItems;

    @ApiModelProperty(value = "", required = false)
    @TableId(type = IdType.UUID)
    @Length(max = 32, message = "id 超出最大长度32")
    private String id;
}
